<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>标签库监控平台</title>
    <link rel="stylesheet" href="./static/plugins/layui/css/layui.css" />
    <style>
        #login-div {
            position: fixed;
            right: 50px;
            top: 10px;
        }

        .login-div{
            width: 180px;
            display: inline-block;
            margin-left: 0px;
        }

    </style>
</head>
<body class="layui-layout-body">

<div class="layui-upload">
    <button type="button" class="layui-btn" id="test2">多图片上传</button>
</div>

<script src="./static/plugins/jquery/jquery-2.0.3.min.js"></script>
<script src="./static/plugins/layui/layui.js"></script>
<!--登陆操作 -->
<script>
  //JavaScript代码区域
  layui.use(['upload','layer'], function(){
    var upload = layui.upload;
    var layer = layui.layer;
    upload.render({
      elem: '#test2'
      ,url: '/upload.do'
      ,multiple: true
      ,accept: 'file'
      ,exts: 'pdf'
      ,number: 5
      ,before: function(obj){
        layer.load(); //上传loading
        this.data={'storeId': 1,'storeName':2};
      }
      ,done: function(res){
        //上传完毕
        layer.closeAll('loading');
      }
    });
  });
</script>
</body>
</html>